Don't stringify Buffer objects + remove unused vars

Before this change, temporary files are written like this:

    {
        "contents": [
            84,
            128,
            ...
        ]
    }

Afterwards it will look more like this:

    {
        "contents": "This is my content"
    }

The code to change "contents" back into a Buffer already existed but I
added the UTF8 encoding to force a specific encoding instead of letting
it default to UTF8.

The second portion of this commit just removes unused variables.