check timeperframe before setting it

and return a proper error if the time-per-frame is invalid
(numerator or denominator < 1)

Closes: #61