Improve logic for removing data directory from install options before calling upgrade. Thanks to David McWilliams