refactor logging line numbers
add internal logging to AppleScript tests

Run tests in Script Editor and view results in "Events" tab
minor clean up