Fluctuation theorems in small systems: extending thermodynamics to the nanoscale