Define rspec-from-project-root and rspec-from-directory before they are used in funcitons to avoid invalid function error