Simply changing to relative-path did not do the job. Also had to write code to create the folders if they did not exist.