Present loaded logical Matlab arrays with a boolean dtype

There was already some code which attempted to do this in the Matlab file reader, but it was totally broken. To be specific, the old code assigned to a dtype to a local variable bool_dtype rather than self.bool_dtype, and so later attempted uses of that dtype would be null/None and so would not have an effect.

I've not only fixed this but also made the writer set the logical flag if you write out an array of bools.