added initial /usr/env/python3 line to header so emacs would recognize even with the weird file ext, added exception handling and enclosing json for PortfolioJSONExporter