Modified the rotate script to work with GNOME 3.