corrected scriptdir and scriptname variables when called through a symlink