Updated upload_image example to use PATH instead of DIRECTORY_NAME or similar. Removed unused local variables.
and in particular the location of the templates. Fixed compilation of application launcher, and make it more flexible.