Simple If Statement Python String Replace Not Working