Added code to output policy and fix some bugs with policy_export().
Finish policy export command for now, TODO: add export to specific file.