Fixes gcd, lcm

Makes them work for negative numbers