Added mask test, and tweaked some tolerance values for FF / Safari compatibility.