correctly handle base path. closes #18