British woman detained by Iran says it was hard to remain positive in prison, hours before she and her husband were sentenced to 10 years for espionage.