use bytes for paths, supporting weird encodings
unit test for exotic filenames
unit tests in functions
Added a printerr func to print to stderr