Add tests for determining source dir