Use if name main

Prevent accidental script execution on import with if __name__ == '__main__'

Use Nose as a test runner