refactor: move function createProjectRoot to badtools