resolve webAbsPath if relative path provided

slight refactoring and rewording
if webAbsPath is passed in, use absolute paths everywhere
fixed cheerio options to perform the same parsing while reading and writing
renamed webAbsPath to abspath
cleaned up regex matching of root
more explicit checking of whether abspath is set