Fixed #2: Added custom write_PACKAGES wrapper

Adding custom write_PACKAGES function that handles network drive under Windows. This should address issue #2
Fixes #1: fixed archive.packages on Windows

archive.packages has been fixed by allowing regular file path passed as
repo.root under Windows. In addition, PACKAGES files are now only built
once for each package type instead of on a per-package basis.