Use mkdir -p instead of install -d
Style.
Error handling.