Export: check for end of export in ticks, not in tacts.

This works better with time signature changes. Closes #440.
lenght() will return the current song length in tacts, which multiplied by ticksPerTact() should yield the song length in ticks, rounded up to a whole tact (bar).