Fix windows bugs.

Commands were not wrapped in strings in system() calls, as they should
have been, which caused a crash. File extensions were hardcoded, so it
would only output ".pre" files in every stage.