Fix a bug : shared_paths may be cotains files and they will be create as directory

Fix a bug : shared_paths may be cotains files,  Ex: configs/database.yml will be create as a directory