fix(photo): DRY directory creating function for proper paths