more mswin fixes: null output file and directory traversal