After trying out a few times we finally figured out how to get this to work. A sample application is available here for anyone to fork and look at. https://github.com/hightail/automation-public. One use of this would be to call your automation tests from external scripts and do a full end to end test of the system. Feel free to leave any comments.