Preserve metadata when assigning paths (#6)