Return a blank array instead of null if there are no repositories

Fixes a bug where it's impossible to add repositories in the web
interface if none are defined.
Merge pull request #200 from veeti/fix-no-repositories

Return a blank array instead of null if there are no repositories