fixed file selection (directories with extensions) bug