Fix TimedItem modulus helpers to handle negative values

Have confirmed the updates to test-iteration-start.html
Merge pull request #334 from steveblock/modulusWithNegativeValues

Fix TimedItem modulus helpers to handle negative values