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 like your below pattern better:

```
try:
     import fcntl
 except ImportError:
     fcntl = None
```

Doesn't super matter.