Fixed chunk number calculation.

See JIRA ticket. Tested in Windows and MAC. Fixes a test in Drive that was consistently failing in Windows.
Nice catch Lee, I take the wrap for that sneaky wee bad and bad bit of code.