Makes permuations; Based on ActiveState recipe 190465