Added dependencies for installer targets and added function safe_path() to escape paths passed as arguments.