fixed bug that removed file extension in output file (windows only)