Added fix for filepaths that may look like a filename.