Fix for AppEngine

Google AppEngine does not allow you to import netrc because netrc import pwd.

This patch moves the import from the top of the module to inside the function get_netrc_auth where the function body was already wrapped in a try catch.