use os.path.join; added try to autodetect map data