Handling redirections with curl if safe_mode or open_basedir is enabled.
Fixed typo. Thanks noahm
Formatting/comment tweaks for #21