Updated deprecated function WPDB::escape

WPDB::escape has been deprecated for security reasons. More information here: http://wordpress.org/support/topic/wordpress-36-rc2-last-minute-wpdbescape-deprecation-is-not-nice

404 Redirected was throwing the following:
Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /var/www/html/wp-includes/functions.php on line 2919

I've replaced all instances of 'wpdb->escape' with 'esc_sql' as suggested.
Note: this is a notice and not a warning but it's an easy fix. Since this is a pretty straight forward matter of replacing one escape function with another, there shouldn't be any issues, but based on some light testing, the plugin seems to be working properly and the notice is gone.