jquery.byteLimit: Partial rewrite to fix logic errors