the rest of a fix for bug #5133: installer fails when installing into an empty directory
the rest of a fix for bug #5133: installer fails when installing into an empty directory

# needs testing


marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core