Setting executable permission on linux and mac os