Fixing the obvious stuff by mar77i and fixing the obvious stuff he forgot.
fuck that
Merge branch 'master' of github.com:FRIGN/lock
fix line endings, add a try_mkdir function