You’re better off leaving retirement funds alone, but if you do need to dip in, there are a few penalty exceptions.