source files copy as file not as a new directory

When OUTPUT_SOURCES is set to True, the copy function within util.py checks if the destination path is a directory. If not, a directory is made. Instead of the intended result like this:

/output/my-post-name/index.html
/output/my-post-name/index.txt

It results in:

/output/my-post-name/index.txt/my-post-name.txt

Where index.txt is a directory.