Actor Hamish Linklater makes his playwriting debut with an at first funny but ultimately haunting modern fairy tale