Refactor path construction from null terminated iterator ranges