Fixed memory logic, added memory test bench

I got the memory unit working I believe. I wrote a test bench for
testing a single 32 bit write and then reading it back as a 32, 16 and a
8 bit number and it was correct. Still unsure about the instruction
address offset and if it is implemented correctly.