fix #264 (bad movement masks), improve tests

Fixed silly movement mask bug.

This breaks the "legend of zokoban" test -- I made test failures now give *some* information (a state diff), but its usefulness & readability is limited for large states. Not sure precisely what's going on, it's likely that some part of Zokoban was experiencing the same bug. Hopefully it doesn't _rely_ on it.
Since you can find the longest "tile" string, you could pad every comma-separated chunk to be the same length. Then if your screen is wide enough (or if you can scroll), it will also be easy to find a given grid position in the "uncompressed" version.

Alternately, you could use the game's legend to print out single characters for tiles for which the legend has entries, and print out an "extended legend" before or after the map to describe "X and Y and Z" that might not appear in the original legend. This sounds like useful output, but probably deserves its own patch.