Apparently on windows reading text files (like batch scripts!) gives CR line endings, causing commands to end on CR. Strip those so nothing gets confused by stuff like that.