Resolve build and install directory paths

Closes #3600