Senior civil servant’s appearance at public inquiry reveals Post Office broke spending rules when it diverted money to legal battle ...