Add basePath config option and test, add npmignore file