Added exception handling and a few tests.
added argv and argcount
added tests for argv and argcount