Here are two patches I've just pushed. The first exposes new alignment-checking functions for use from the command-line. The second adds a few tests to exercise that code. Feedback welcome.