Set basedir properly