Update capture_functions.R

Fix current.dir creation/reference problem in finalize dependency.si