move contextFromList to Package/Library.hs and write test
move fetchVersionedDepends to Package/Library.hs and write test
write lazy strings directly to files without converting them