Attaching files in notebook has not worked since 5.10
This has been reported in http://trac.sagemath.org/ticket/15308. But it doesn't look like fixing it is a very high priority for anyone that knows what they are doing - unfortunately I don't have a clue.
There is a comment that a workaround might be:
"Your problem seems to be that init.sage is evaluated before Sage is started. A workaround might be to use a .py file starting with from sage.all import *"
Can anyone help with telling me how to make use of this suggestion?
This is also reported at https://github.com/sagemath/sagenb/issues/169 . I do wish I knew the answer to your question! Because I used to use it too. Unfortunately sagenb has not been as high of a priority since the cloud development started.