Check for unique post slug in wp_insert_post_data

Fix of bug where the script didn't check if there were more posts with the same slug.