Replaced specific referent to forward slash with directory separator to make it more cross OS.
Removed if statement in favor of a one line solution.