add test for running commands from a subdirectory

see #362