The screenwriter behind “Being John Malkovich” and “Eternal Sunshine of the Spotless Mind” makes his directorial debut.