Some smaller python related fixes

Some fixes for monitor-secret.py, added a .gitignore.