Fixing path_elements.cpp test
Make zero copy serialization code more readable