Clean up and improve updateXBMCTables.

The main improvement is special characters (quotes etc) are now properly,
encoded so they don't break JSON.
Merge pull request #30 from fyfe/fix-updateXBMCTables

Clean up and improve updateXBMCTables.

Add special characters support. thanks to fyfe