Add range limit to n to handle less than 0 and greater than numFrames

This solves an issue talked about here: http://forum.doom9.org/showthread.php?p=1653750#post1653750 d2vsource can't handle frame requests for frames beyond the max number of frames.

Sorry this should be the last version now that it's all fixed up.