Json path : fix some paths not handled correctly

Hi,

This patch fixes 3 cases which happen frequently:
- querying the root node using '$'
- calling with invalid path starting with invalid character (eg using a xpath in place of json path)
- calling with invalid path containing a dot not followed by a member name nor a wildcard

First pull request here, so let me know if I miss some important things ;-)
Cheers,
benjamin