Another twiddle to the managed resource interface, making it lazy via
the IO monad.
Started putting together sensible tests for ManagedIO etc...