path_with_format needs to account for a nil format