Add a format.py script to validate the source

It's called format.py because the intention is to then normalize the
source according to some rules and to serialize it back to disk.