path handling for JSON

fixes the problem mentioned on http://www.xbmcnerds.com/index.php?page=Thread&threadID=26483