Fixing a bug with directories with dots in name