Added checking for lecture, so empty directories no longer created if lecture not posted