Prevent race condition and use a here document

Hi Holger, this just prevents a possible race condition between the cration of the directory and the permission setting.