Add also some testing to make sure help, long help and handling of invalid arguments works as expected. Based on pull request #19 originally by Laurent Arnoud (@spk).