Don't override $basedir if already assigned.

A library shouldn't change the outside environment without being asked to.