Created unit test in test.py

Created unit test in test.py
Updated .gitignore
Wrapped command line handling codes in __main__