added code to ensure that environment-paths (log, data, media, etc) always end with a backslash