add support for repo mirrors via N_MIRROR env variable

Usage:
```
export N_MIRROR="http://<hostname>[:<port>][/<filepath>/]"
```
Tested on Ubuntu 14.04 LTS Trusty Tahr & Mac OS X 10.6.8