os.path.dirname returns '' not None in some cases, handle this so inventory can be specified with ./