Add some unittests and functional tests

 - Add .pyc to .gitignore