Lock implementation for windows based on makedir
make lock definitions conditioned on platform

- Fixed also some win tab funkyness