Fix lineendings and permission bit