Fixed #370 -- added CLI tests for app sharing workflow.