Fix malicious path detection for empty string path