Find base directory.