Adding PHPUnit tests and adding methods getJson (--json) and getXmp (--xmp)