Added whitespace safeguards, simplified path

ACK.

Please remove the linux-only version. Feel free to fixup the appropriate commit.