replace all string merges with os.path.join; small template changes