Improved gsub method and properly includes /usr/ files