Add test to verify .netrc authentication behavior.

Here's what should happen:

- If no credentials are given, use netrc if there's a netrc entry.
- If credentials are given, they should override netrc.