mkdir bin before writing to it