Remove trailing spaces in filenames

FAT does not support trailing spaces, so we must remove them