added tests for nested routes. also fixed issue with trimming path