Fixed bug if file was in originalDir

If there was a file in the originalDir directory, it would fail trying
to treat the file is a directory.