replace all the elements of the basedir list by its corresponding absolute directory path, only is that directory exists.
basedirs = [ os . path . abspath ( basedir ) for basedir in basedirs if os . path . isdir ( basedir ) ]