Implement command line arg parsing

Because args4j won't work with this for some reason.