Some small general fixes.

This fixes the problem that Vincent Zhou posted about with "path-less" methods.
And while testing with the Freebase API that has path-less methods I also stumbled upon the issue with some property names having invalid characters for variable names, so fixed that as well.