Fixed a bug in compositesUpTo

- Fixed a bug in compositesUpTo that would cause x to be returned in
the result even if x is prime - essentially had to add numbers between
last prime+1 and x rather than numbers between last composite found and
x