Misc Wordpress-specific fixes

- Install imagic and curl PHP extensions
- Enable mod_rewrite
- Change ownership of the /app directory (turn write mode for Wordpress)