IssueID #36: added function for giving the right path to file objects