remove unnecessary includes
use proftpd's regex type and supporting functions
emit a useful error message on curl failure