Fixed bug in implementation of _check_tol()
Added test for _check_tol. (#14)