The former director of the US Federal Bureau of Investigations has been accused of lying to Congress.