changed all unix-only dependencies

There were several locations with unix-only dependencies. These were
causing errors when running in a windows console. Wrapped all of these
with try logic. Now it all runs in windows without any errors.