add normalization test
fixed lstat
make atomic spew thread safe
tidy code