Fix primefactor for 0

Previously there was an infinite recursion. Now we just return.