Fixed #9

Fixes the segfault when doing inverse real 2D transforms by using buf instead of dout for the temporary memory in the transposes.