Removed unnecessary variable - 'endpath'

There is previously declared $app_dir