Switched from the hamfisted conditional to the flags

`makepkg` has flags to install dependencies and to install the created package upon
completion, so switched to using that
Fixed random value, always off by one

Seems to be an indexing issue, not very familiar with the array indexing in zsh,
this was discovered when trying to randomize between two wallpapers, always returned
the first.