Previous check-in for getting filters working put the compiler directive in the wrong locations.

Also modified a file descriptor copy to copy a more appropriate source.