make sure that find_base_dir always returns a directory path, not a file path
Merge pull request #660 from boegel/fix_find_base_dir

make sure that find_base_dir always returns a directory path, not a file path