Thermally induced reversible easy axis rotations in permalloy thin films