Avoid removing files that are still in use, regardless of OS

This is required for windows, and also works on Unix.
[#77329972]

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
Remove duplication around removing cache entries

[#77329972]

Signed-off-by: Simon Leung <leungs@us.ibm.com>
Move caching logic into a separate object

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
Move file wrapper type into its own file

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
Remove extraneous file seek

No need to seek to beginning since we reopen the file now

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
Remove duplication between cached and uncached downloads

Move some behavior into the fileCache

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
Generate unique names in cache, regardless of source file name

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
add appveyor