Support for setting basedir via env var