clean up netrc file check in credentials.py and dont rely on python 2.7 version of netrc class