trunion api (bugs 1070189, 1070191)

WIP, DO NOT MERGE

Bug 1070189: Call the trunion API (not tested with servers yet)
Bug 1070191: Signing management command
Opening the files without closing them afterwards doesn't seem right, how about `with open...`? (Same for tests below)