Use open() instead of obsolete file()

Signed-off-by: Michal Čihař <michal@cihar.com>
Use safer evaluation for Captcha

As we need only number literals and few operators, implementing using
ast is quite simple.

Still the original code should be safe as well as the captcha code has
been signed and signature checked before evaluating.

Signed-off-by: Michal Čihař <michal@cihar.com>