Some quick fixes

I'm testing the plugin and found some caveats that need to fix to make it work on my wordpress installation. First commit it's about a missing var that throws a warning when WP_DEBUG is true.

I need the second for two reasons, wp_get_attachment_metadata is returning full path on my install (wp 3.6) and we are using a cdn