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.
I believe the cross-platform function for this is get pass.getuser(), but what you have here is fine with me.