repo: refactor size calculation, ignore symlinks. fixes #1149