Fix bug for in-place hflip and vflip, see #27

This fixes #27 which made a terrible output when doing in-place hflip or vflip. Sorry for the bug, thanks to @jonathantompson for spotting it, to@soumith for pinging me.