bugfix: contents needs to be decoded

the contents returned from swift are in bytes and need
to be decoded.

Also includes changed tests to verify this.