fix setwd problem when sourceCpp used a relative path and included an R code chunk