Fixed mistake made in memcpy() calls

This commit fixes an error introduced when retrofitting calls from fread() to
memcpy() - dest and source were switched pretty much universally (ha!).