Improve adding of function required files

* Added ability to add files with filename as a path (not only basename)