[api] fix handling of files inside _project container, add testcases