Appveyor x64 compile issue

Fixes issue #346 where compilation for windows x64 was failing, preventing pre-compiled binaries for the same architecture from being created.

Also fixes a couple of small issues with tests failing.
I don't understand why this line exists at all, we call `var fd = self.id` a few lines above it.