Added rpath function to get the correct path from root to the given
location, including integer filter. Created tests for x1-> and rpath.