Fix imp.cache_from_source() if the directory name contains a dot

If the directory name contains a dot but not the filename, don't strip at the
dot.
2 files changed