Consistently use default _options.basedir

This commit adds a consistent default basedir fallback wherever it is needed.