Implement getFileByPath without using Path class

+ added test

Signed-off-by: nicoruti <nico.rutishauser@diligent-it.com>