Fix directory references

Fix issue with names of files using getwd() and paste.