Added whitespace safeguards, simplified path

Because I want to give you the possibility to decide which one you prefer.
Yes $() spawns a subshell. So it `cd`s to this file and checks the output.
That's the only easy solution to get the full path I know which is portable.