Added missing scriptdir variable.