Support writing Bools as MATLAB logicals
Use isequal in tests to ensure type equality
Fix tests for writing invalid variable names