Strip trailing whitespace when creating a temp folder for preserving torrent files