Followup to major changes

* Use `.sexp` instead of `.el` for metadata files, since they do not actually contain Emacs Lisp.
* Switch from obsolete `flet` to `cl-flet`.
* Add ERT tests.

Submitting now, because next I will reorganise the code, which will be more major.