Fix for files being created in the parent directory of the selected directory.