added missing "local" to declare n
fix indentation
engine: validate pre-conditions on extensions

extensions are matched by searching for the '.' char and thus must
start with this character.
Merge pull request #137 from uucidl/F-CodeCleanup

A bit of code cleanup