Remove trailing space in directory name