GHC's "--tests" option fails because of bad assumption about resource's location

Basically, the formula attempts to run some commands without changing to the resource's directory. My patch makes the code work, but is it the "right" fix?