use download.file to get a file from URL

this replaces system call to wget and works on mac which does not have
wget by default. Also checks if file already exists and skips the
download.
Merge branch 'master' of github.com:PecanProject/pecan