Better handling of apostrophes

Improvement about handling of folders whose names includes apostrophes
and other minor changes