-added new unit test, 'context'
-made shell detection more robust, found a breaking test case
-misc bugfixes