Tweak command-line handling
Add test script