Changed the check for subfolders to only work if the shortest path is a folder itself. Changed the backup and test-filters method to use the same expansion logic so the filter test is more reliable. This fixes #2778
Cng