Place lock files in reasonable locations, switch to argparse.

This fixes #1.