made it so R script can work in a relative path