Smarter path parsing