Fix version detection for Drupal and WordPress

Some small changes for Drupal and WordPress version detection