More output to refactoring, and enhancing the test.

Uncommented a debug message from the refactoring, and added more info in it.

Added a function to the test file, so as to test if the refactoring was
finding the correct variable -- not another in a different scope.
Added checking of type for the selected variable.

If it's not an MVar -- that is, if its type's name isn't "GHC.MVar.MVar" --,
an error is raised. This may not be the best way to do it. Will look for a
better one later.