Fixed installSinglePages so that hidden and empty files are skipped

Hidden (files starting with dot) and empty files (common in git empty directories) were being treat as single pages and getting installed. Fixed the code so that such files are skipped.