Only iterate over values in pathParams and requiredParams

Fixes #237
Yes. Only iterate with for-in if it's an object/map/hash. https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml#for-in_loop