Better checking for file containment