Update mg_findext to check for sv arg first. Other fixes.

 * Clean up spacing
 * Define mg_findext directly instead of using a define
 * Test case where mg_findext() is called on an object with no magic