add unit tests for pop2phase.py.
perform more selective handling of exceptions.
add a few more entries in .gitignore.