Move SIGINT handler into server
Add command-line interface for one-off builds
Move cleanup to exit handler