Fix Json return and windows path encoding

Fixes issues with Windows paths and problem with decoding the return json