Fix regular expressions for GHCi to correctly parse multiline output.

Without re.DOTALL regexps will match anything *except* a newline.