Use the calling method's directory to define basedir, if not given. Fix #2