fixes #268: command/build: fixes the bug that If pkg.main without extension, main entry will be missed; cleans all user input.